﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Bdcs.Core.Entity
{
    /// <summary>
    /// DeviceNoUp数据模型对象
    /// </summary>
    [Serializable]
    public partial class DeviceNoUpMod
    {
        /// <summary>
        /// 初始化DeviceNoUp数据模型对象
        /// </summary>
        public DeviceNoUpMod()
        {
            
        }
        /// <summary>
        /// 初始化DeviceNoUp数据模型对象并给所有字段赋值
        /// </summary>
        /// <param name="deviceNO">DeviceNO</param>
        /// <param name="cTime">CTime</param>
        public DeviceNoUpMod(string deviceNO,DateTime cTime)
        {
            //给DeviceNO字段赋值
            this.DeviceNO = deviceNO;
            //给CTime字段赋值
            this.CTime = cTime;
        }
        
		//属性存储数据的变量
        private string _deviceNO;
        private DateTime _cTime;
        
        /// <summary>
        /// DeviceNO
        /// </summary>
        public string DeviceNO
        {
            get { return this._deviceNO; }
            set { this._deviceNO = value; }
        }
        /// <summary>
        /// CTime
        /// </summary>
        public DateTime CTime
        {
            get { return this._cTime; }
            set { this._cTime = value; }
        }
        
        /// <summary>
        /// 对比两个DeviceNoUp数据模型对象是否一致
        /// </summary>
        /// <param name="obj">要进行比对的DeviceNoUp数据模型对象</param>
        /// <returns>返回是否一致，为true一致，为false不一致</returns>
        public override bool Equals(object obj)
        {
            //判断传入对象是否为null
            if (obj == null) return false;
            //将传入对象转换成DeviceNoUp数据模型对象
            DeviceNoUpMod deviceNoUpMod = obj as DeviceNoUpMod;
            //判断是否转换成功
            if (deviceNoUpMod == null) return false;
            //进行匹配属性的值
            return
                //判断DeviceNO是否一致
                this.DeviceNO == deviceNoUpMod.DeviceNO &&
                //判断CTime是否一致
                this.CTime == deviceNoUpMod.CTime;
        }
        /// <summary>
        /// 将当前DeviceNoUp数据模型对象转换成哈希码
        /// </summary>
        /// <returns>哈希值</returns>
        public override int GetHashCode()
        {
            //将DeviceNoUp数据模型对象的属性进行按位异或运算处理得到哈希码并返回
            return
                //将DeviceNO进行按位异或运算处理
                (this.DeviceNO == null ? 2147483647 : this.DeviceNO.GetHashCode()) ^
                //将CTime进行按位异或运算处理
                this.CTime.GetHashCode();
        }
        /// <summary>
        /// 将当前DeviceNoUp数据模型对象转换成字符串副本【仅显示在SQL中不能为空的列】
        /// </summary>
        /// <returns>字符串形式副本</returns>
        public override string ToString()
        {
            //将当前DeviceNoUp数据模型对象转换成字符串副本
            return
                "[" +
                //将DeviceNO转换成字符串
                this.DeviceNO + "," +
                //将CTime转换成字符串
                this.CTime +
                "]";
        }
    }
}
